package com.five.welcome.dao;

import com.five.welcome.entity.WelcomeProgress;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ywt
 * @since 2024-07-24
 */
@Mapper
public interface WelcomeProgressMapper extends BaseMapper<WelcomeProgress> {

    @Select("select * from welcome_progress where s_number=#{sNumber};")
    WelcomeProgress getProgressBySNumber(String sNumber);

    @Select("select * from welcome_progress;")
    List<WelcomeProgress> getAllProgress();

    @Insert("insert into welcome_progress (s_number,registered) values (#{sNumber},1)")
    void addProgress(String sNumber);
}
